﻿using UnityEngine;
using System.Collections;

public class Director : MonoBehaviour {
    public ToggleX[] buttons= null;
	// Use this for initialization
	void Start () {
        buttons = gameObject.GetComponentsInChildren<ToggleX>(); 
	}

    void RestButtons()
    {
        foreach (ToggleX _toggle in buttons)
        {
            _toggle.gameObject.SetActive(false);
        }
    }
    void StartFadeIn(float delta)
    {
        StartCoroutine(StartFadeIn_Impl(delta));
    }
    IEnumerator StartFadeIn_Impl(float delta) {
        foreach (ToggleX _toggle in buttons)
        {
            _toggle.gameObject.SetActive(true);
            _toggle.Fadein();
            yield return new WaitForSeconds(delta);
        }
        yield break;
    }
	// Update is called once per frame
	void Update () {
	
	}
}
